<?php

require '../classes/imageClass.php';
require '../classes/albumClass.php';
require'../classes/connectionFactoryClass.php';
require'../classes/imageDao.php';
require'../classes/albumDao.php';
require'../classes/validates.php';
require'checksDate.php';


$image = new ImageClass();
$album=new AlbumClass();
$date = new checksDate();
$c = new ConnectionFactory();
$db = $c->getConnection();
$imageDao = new imageDao($db);
$albumDao = new albumDao($db);
$valid = new validates();

/*$image->set('Rafael');
$image->setDateInclusionAlbum('2013-07-23');
$image->setDirectory('uploads');
$image->setPhotoCapa('capa.jpg');*/


$dir='../uploads/Rafael';


$fi=  scandir($dir);
    print_r($fi);
    
    if(isset($fi[2])){
        echo'não tem 3';
        rmdir($dir);
        $albumDao->delete($idAlbum);
    }else echo'tem 3';
?>
